package com.lql.core;

import lombok.AllArgsConstructor;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @author wangjian
 */
@Data
@Component
@AllArgsConstructor
public class ThirdProperties {

    private static final String PREFIX = "third.";

    private final Qn qn;
    private final Zfb zfb;
    private final Wx wx;

    @ConfigurationProperties(prefix = PREFIX + "qn")
    @Data
    @Component
    public static class Qn {
        private String ak;
        private String sk;
        private String url;
        private String bucket;
    }

    @ConfigurationProperties(prefix = PREFIX + "zfb")
    @Data
    @Component
    public static class Zfb {
        private String publicKey;
    }

    @ConfigurationProperties(prefix = PREFIX + "wx")
    @Data
    @Component
    public static class Wx {
        private String partnerKey;
    }
}
